﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace iTeamyou.LTS.Core.Migrations
{
    public partial class Update100601 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "SyncId",
                table: "SyncSuppliers",
                type: "varchar(95)",
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SyncId",
                table: "SyncProducts",
                type: "varchar(95)",
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SyncId",
                table: "SyncBatches",
                type: "varchar(95)",
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SyncId",
                table: "SyncBarcodes",
                type: "varchar(95)",
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SyncSuppliers",
                table: "SyncSuppliers",
                column: "SyncId");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SyncProducts",
                table: "SyncProducts",
                column: "SyncId");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SyncBatches",
                table: "SyncBatches",
                column: "SyncId");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SyncBarcodes",
                table: "SyncBarcodes",
                column: "SyncId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_SyncSuppliers",
                table: "SyncSuppliers");

            migrationBuilder.DropPrimaryKey(
                name: "PK_SyncProducts",
                table: "SyncProducts");

            migrationBuilder.DropPrimaryKey(
                name: "PK_SyncBatches",
                table: "SyncBatches");

            migrationBuilder.DropPrimaryKey(
                name: "PK_SyncBarcodes",
                table: "SyncBarcodes");

            migrationBuilder.DropColumn(
                name: "SyncId",
                table: "SyncSuppliers");

            migrationBuilder.DropColumn(
                name: "SyncId",
                table: "SyncProducts");

            migrationBuilder.DropColumn(
                name: "SyncId",
                table: "SyncBatches");

            migrationBuilder.DropColumn(
                name: "SyncId",
                table: "SyncBarcodes");
        }
    }
}
